//
//  SettingHttpTools.m
//  Village
//
//  Created by 程虎 on 2017/10/9.
//  Copyright © 2017年 程虎. All rights reserved.
//

#import "SettingHttpTools.h"

@implementation SettingHttpTools
+ (void)uploadUserIconWithImgAry:(NSArray *)imgAry Success:(void (^)(NSDictionary *valueDict))success failure:(void (^)(NSString *error))failure
{
    NSMutableDictionary *bean = [NSMutableDictionary dictionary];
    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
    [bean setValue:dict forKey:@"entitybean"];
    [dict setObject:[Tools toJSONString:imgAry] forKey:@"headimg"];
    [dict setObject:[Globle getInstance].account.userid.length
     > 0 ? [Globle getInstance].account.userid : @""  forKey:@"id"];
    [NetRequestClass Post:UpdateUserInfoURL Parameters:bean success:^(id result) {
        if (success) {
            success(result[@"data"]);
        }
    } failure:^(id valueCode, id error) {
        if (failure) {
            failure(error);
        }
    }];
}
@end
